package com.rc.web.task;

import com.rc.common.util.RedisHelper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
@Slf4j
public class Task {
    private final RedisHelper redisHelper;

    @Scheduled(cron = "0 0 0 * * ? ")
    public void clearToken() {
        log.info("清理token=====>");
        redisHelper.cleanCache("token*");
        log.info("token清理完毕=====》");
    }


}
